<?php defined('_JEXEC') or die('Restricted access'); ?>



<form action="index.php" method="post" name="adminForm">
    <div id="editcell">
        <table class="adminlist">
            <thead>
            <tr>
                <th width="5">
                    <?php echo JText::_('NUM'); ?>
                </th>
                <th width="20">
                    <input type="checkbox" name="toggle" value=""
                           onclick="checkAll(<?php echo count($this->items); ?>);"/>
                </th>
                <th class="title">
                    <?php echo JText::_('Servers table and orders'); ?>
                </th>
                <th width="5%" align="center">
                    <?php echo JText::_('Published'); ?>
                </th>
                <th width="1%" nowrap="nowrap">
                    <?php echo JText::_('Id server'); ?>
                </th>
                <th width="2%" nowrap="nowrap">
                    <?php echo JText::_('Count orders'); ?>
                </th>
            </tr>

            </thead>
            <?php
            $k = 0;
            for ($i = 0, $n = count($this->items); $i < $n; $i++)
            {
                $row = &$this->items[$i];

                $published = JHTML::_('grid.published', $row, $i);
                $checked = JHTML::_('grid.id', $i, $row->id);
                $link = JRoute::_('index.php?option=com_server&controller=server&task=edit&cid[]=' . $row->id);

                ?>
                <tr class="<?php echo "row$k"; ?>">
                    <td>
                        <?php echo $i + 1; ?>
                    </td>
                    <td>
                        <?php echo $checked; ?>
                    </td>
                    <td>
                        <a href="<?php echo $link; ?>"><?php echo $row->text; ?></a>
                    </td>
                    <td align="center">
                        <?php echo $published;?>
                    </td>
                    <td align="center">
                        <?php echo $row->id; ?>
                    </td>
                    <td align="center">
                        <?php echo $row->countzakaz; ?>
                    </td>
                </tr>
                <?php
                $k = 1 - $k;
            }
            ?>
        </table>
    </div>

    <input type="hidden" name="option" value="com_server"/>
    <input type="hidden" name="task" value=""/>
    <input type="hidden" name="boxchecked" value="0"/>
    <input type="hidden" name="controller" value="server"/>
</form>
